export function jsonClone(v: any) {
    return JSON.parse(JSON.stringify(v));
}
/**
 * Convert a JSON object to a pretty-printed JSON string.
 * @param data - The JSON object to be converted.
 * @param space - The number of spaces to use for indentation, default is 4.
 * @returns A pretty-printed JSON string.
 */
export function prettyJson(data: any, space: number = 4): string {
    try {
        return JSON.stringify(data, null, space);
    } catch (error) {
        console.error("Failed to convert JSON to pretty string:", error);
        return "";
    }
}
